<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: "form-signin"}) do |f| %>
  <%= f.error_notification %>
<h2 class="text-center">用户资料设置</h2>
  <%= f.input :name, required: true, autofocus: true, placeholder: "用户名", label: false %>
    <%= f.input :email, required: true, placeholder: "请输入Email", label: false%>
    <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
      <p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
    <% end %>

    <%= f.input :password, autocomplete: "off", hint: "如果您不想更换密码，请不要填写。", required: false, label: false, placeholder: "请输入新密码" %>
    <%= f.input :current_password, required: true, placeholder: "请输入当前密码", label: false %>
    <%= f.button :submit, "更新", class: "btn btn-primary btn-block btn-lg" %>
<% end %>
<h3>注销我的账号</h3>
<p>不喜欢? <%= link_to "注销我的账号", registration_path(resource_name), data: { confirm: "您确定吗?" }, method: :delete %></p>
<%= link_to "返回", :back %>
